<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>

    </style>
  </head>
  <body>
    <script>
      var str = "<table>";
      var j = 0;
      
        while (j < 5) {
          str += "<tr>";
          var i = 0;
          while (i < 10) {
            str += "<td>" + i + "</td>";
            i++;
          }
          str += "</tr>";
          j++;
        }
        str = "</table>";
      
      document.body.innerHTML += str;
    </script>
  </body>
</html>
